<template>
  <view class="xxicon-button" @click="onClick">
    <view class="icon">
      <u-icon :name="icon" color="#" size="20"></u-icon>
    </view>
    <view class="button-text">{{ label }}</view>
  </view>
</template>

<script>
export default {
  name: 'xxiconcb',
  props: {
    /**
     * 图标类型
     */
    icon: String,

    label: String,
  },
  computed: {},
  methods: {
    onClick() {
      this.$emit('click')
    },
  },
}
</script>

<style lang="scss">
.xxicon-button {
  box-sizing: border-box;
  height: 80upx;
  width: 80upx;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 10upx;
  padding-top: 2px;
  .icon {
    display: flex;
    justify-content: center;
  }
  .button-text {
    width: 100%;
    margin-top: 1px;
    display: flex;
    justify-content: center;
    font-size: 20upx;
    border-bottom-left-radius: 10upx;
    border-bottom-right-radius: 10upx;
  }
}
</style>
